import { heat } from "../base";

export interface HeatStatus {
    version: string,
    water_temp: number,
    steam_temp: number,
    
    pearl_checked: boolean,
    move_origin: boolean,
    stir_top: boolean,
    stir_bottom: boolean,
    trun_left: boolean,
    trun_right: boolean,
    clamp_left: boolean,
    clamp_right: boolean,
    move_alm: boolean,
    water_high: boolean,
    water_low: boolean,
    temp_err: boolean,
    analog: number,

    heat_steam_open: boolean,
    heat_water_open: boolean,
    v3_open: boolean,
    v4_open: boolean,
    bucket2_pump: boolean,
    bucket1_pump: boolean,
    v6_open: boolean,
    v7_open: boolean,
    v2_open: boolean,
    v1_open: boolean,
    clamp_valve: boolean,
    trun_valve: boolean,
    water_pump: boolean,
    steam_pump: boolean,
    v8_open: boolean,
    air_pump: boolean,
}



export async function stir_cap_ctrl(ctrl: number) {
    await heat.post('/stir_cap', ctrl);
}

export async function stir_motor_ctrl(ctrl: number) {
    await heat.post('/stir_motor', ctrl);
}

export async function parts_ctrl(id: number, ctrl: number) {
    await heat.post('/parts_ctrl', { id, ctrl });
}

export async function pearl_motor(position: number) {
    await heat.post('/pearl_motor', position);
}


